.\" with GNOME Manpages Editor Wizard
.\" 
.\" Rua <srua@gpul.org>
.\" 
.\" 
.TH "TestSimple" "1" "0.01" "Thomas Maier" ""
.SH "NAME"
TestSimple \- Bash testing library.
.SH "SYNOPSIS"
#!/bin/bash

.B source lib/TestSimple.sh
.br 

.B is_equal     2 2 \ "Two is equal two"
.br 
.B is_excutable \ "/home/town/root" \ "Root is executable"

\fBdiag "Very important message"\fR
.br 
.SH "DESCRIPTION"
\fITestSimple\fR is Bash testing library. Source it in your test
script and use its functions. During the test \fITestSimple\fR will 
produce \fBTAP\fR output. Such output can be parse by already existing
tools and produce nice looking test reports. Thanks to \fBTAP\fR, test written in Bash
can be executed together with tests written in other languages that
support \fBTAP\fR format. Their outputs can be bind together by \fBTAP\fR parser
(read more in \fBTAP\fR section).
.br 
\fITestSimple\fR will provide tools to test basic operation in Bash code, as
well on system commands.  
.SH "PLANNING AND DIAGNOSTIC"
.B testplan
.br 

Define how many tests you plan to execute. Accept single parameter,
.br 
the number of test cases.

.br 
.B diag
.br 

Print diagnostic message. Very useful if you want more verbose test result 
.br 
output. Using this function will not confuse the test output parser. 
.br 
Use it in your test instead of \ "echo" or "printf" commands.
.br 

.B todo_on
.br 

All tests bellow declaration of this function are expect to fail. 
.br 
Very useful if for example, the application you're testing is not
.br 
ready yet, but your tests are.
.br 
Optionaly accept parameter that will be printed out during
.br 
the test.

.B todo_off
.br 

Cancell the described above behavior.

.B skip_on
.br 

All tests bellow this declaration won't be execute. Useful if some
.br 
precondition of your test fail. Like:

	! uname \-a | grep \-q 2.4.31 && skip_on
.br 
	is_dir \ "/lib/modules/2.4.31" "Found place for my module"
.br 

.B skip_off
.br 

Stop skipping the tests.

.B bail_out 
.br 

Immediately quit the test.

	if ! test \-d /boot; then
.br 
		bail_out "How the hell .."
.br 
	fi

.SH "TESTING"
.B is_equal
.br 
.B is_not_equal
.br 
.B is_greater
.br 
.B is_less
.br 
.B is_greater_or_equal
.br 
.B is_greater_or_equal
.br 
.B is_less_or_equal
.br 
.B is_less_or_equal
.br 
.B is_true
.br 
.B is_false
.br 
.B is_exact
.br 
.B is_not_exact
.br 
.B is_file
.br 
.B is_not_file
.br 
.B is_dir
.br 
.B is_not_dir
.br 
.B is_symlink
.br 
.B is_not_symlink
.br 
.B is_process_id
.br 
.B is_not_process_id
.br 
.B is_executable
.br 
.B is_not_executable
.br 
.B is_insmod <kernel module> [<description>]
.br 
Will check if given kernel module is currently loaded into the kernel.
Given module name may be either a simple string or regular expression.

.B is_not_insmod
.br 



.SH "ENVIRONMENT"
Note: 
.B libbashtab
will exports into your script environment few global variables.
.B 
SKIP
.br 
.B 
TODO
.br 
.B 
TESTCOUNTER
.br 
Don't use variables with such a names neither change their values.


.SH "DIAGNOSTICS"
.B 
libbashtap
will (at least, should) print output, complience with the TAP definition.

.SH "RETURN VALUES"

.SH "ERROR HANDLING"

.SH "TAP"
.SH "BUGS"

.SH "SEE ALSO"

.SH "AUTHOR"
Thomas Maier <hayzer at gmail dot com>
